#include<iostream>
#include<queue>
using namespace std;
priority_queue<int,vector<int>,greater<int>> a;
int main()
{
	ios::sync_with_stdio(false);
	int t,n,x;
	cin>>t;
	while(t--)
	{
		cin>>n;
		while(n--)
		{
			cin>>x;
			a.push(x);
		}
		while(!a.empty())
		{
			cout<<a.top()<<" ";
			a.pop();
		}
		if(t)
			cout<<endl;
	}
    return 0;
}
